package thread;

public class CreateThread {
    public static void main(String[] args) throws InterruptedException {
        Thread welcomeT = new WelcomeThread();
        welcomeT.setDaemon(true);
        welcomeT.start();
    }

    static class WelcomeThread extends Thread {
        @Override
        public void run() {
            for (int i = 0; i < 100; i++) {
                System.out.printf("2. Welcome I am %s%n", Thread.currentThread().getName() + i);
            }
        }
    }
}
